-- GENERATED SPELL FOR [Baron Rafe Dreuger] --


function spell0_19874(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19874', 6260, 1)
end

function spell1_19874(pUnit, Event) --@Judgement of Command,n/a--
pUnit:FullCastSpellOnTarget(29386,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19874', 0, 1)
end

function spell2_19874(pUnit, Event) --@Seal of Command,n/a--
pUnit:FullCastSpellOnTarget(20424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19874', 616, 1)
end

function spell3_19874(pUnit, Event) --@Seal of Command,Self--
pUnit:FullCastSpellOnTarget(29385,pUnit)
pUnit:RegisterEvent('Sorts_19874', 30000, 1)
end

function Sorts_19874(pUnit, Event)
local choix_sorts_19874 = math.random(0, 3)
if choix_sorts_19874 == 0 then
pUnit:RegisterEvent('spell0_19874', 1, 1)
end
if choix_sorts_19874 == 1 then
pUnit:RegisterEvent('spell1_19874', 1, 1)
end
if choix_sorts_19874 == 2 then
pUnit:RegisterEvent('spell2_19874', 1, 1)
end
if choix_sorts_19874 == 3 then
pUnit:RegisterEvent('spell3_19874', 1, 1)
end
end

function mob19874_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19874', math.random(1500, 3000), 1)
end

function mob19874_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19874_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19874_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19874, 1, 'mob19874_Action')
RegisterUnitEvent(19874, 2, 'mob19874_Leave')
RegisterUnitEvent(19874, 3, 'mob19874_Kill')
RegisterUnitEvent(19874, 4, 'mob19874_Die')
